import {Component, OnInit} from '@angular/core';
import {environment} from '../../../environments/environment';
import {HttpClient} from '@angular/common/http';

@Component({
  selector: 'app-serviceb',
  templateUrl: './serviceb.component.html',
  styleUrls: ['./serviceb.component.scss']
})
export class ServicebComponent implements OnInit {
  result1: string;
  result2: string;

  constructor(
    private http: HttpClient
  ) {
  }

  ngOnInit() {
  }

  test1() {
    this.http.get(environment.root + '/api/serviceb/test1').subscribe(res => {
      this.result1 = res['data'];
    });
  }

  test2() {
    this.http.get(environment.root + '/api/serviceb/test2').subscribe(res => {
      this.result2 = res['data'];
    });
  }
}
